#include <tuple>
#include <iostream>

using namespace std;

struct A
{
	int _a = 0, _b = 0;
	A(int a, int b) : _a(a), _b(b) {}
	A(const A&) = delete;
	A(A&&) = delete;

	void func() { cout << "A::func" << endl; }
};
ostream& operator<<(ostream& os, const A& b) { return os << "{" << b._a << "," << b._b << "}"; }

template<typename Ty>
struct Construct
{
	Ty _t;
	template<typename... Args>
	Construct(const tuple<Args...>& tp) : Construct(tp, index_sequence_for<Args...>()) {}

	operator Ty& () { return _t; }
	Ty& operator()() { return _t; }
private:
	template <typename _Tuple, size_t... _Indexes>
	Construct(const _Tuple& _tp, index_sequence<_Indexes...>) : _t(get<_Indexes>(move(_tp))...) {}
};

int main()
{

	auto tp = make_tuple(10, 20);
	cout << "(" << get<0>(tp) << ", " << get<1>(tp) << ")" << endl;
	Construct<A> a(tp);
	cout << a << endl;
	a().func();

	return 0;
}